const api = require('../../api/api.js');
const util = require('../../utils/util.js');
const app = getApp();
Page({
  data: {
    imgUrl: app.globalData.imgUrl + 'overallImage/',
    panoramas: []
  },
  onLoad(o) {
    let that = this;
    api.queryOverallsBySiteId({
      data: {
        siteId: o.siteId
      },
      success(res) {
        console.log(res.data);
        that.setData({
          panoramas: res.data.overalls
        });
      }
    });
  },
  copy(e) {
    let url = e.currentTarget.dataset.url;
    wx.setClipboardData({
      data: url,
      success(res) {
        util.showToast('复制成功！', 'none');
      }
    })
  }
})